import pytest
import yaml
import yagmail
import logging
def get_data_from_yaml(filepath):
    with open(filepath,'r',encoding='utf-8')as f:
        return yaml.safe_load(f)

def log_set():
    logging.basicConfig(filename='ggg.txt',level=logging.DEBUG,filemode='w+',format='%(filename)s -> %(lineno)d -> %(message)s')

def email(qq):
    mail = yagmail.SMTP(user='2314336117@qq.com',password='ixpbgkkezjwodhif',host='smtp.qq.com')
    mail.send(to='2314336117@qq.com',subject=' ·月考升班',contents='升班升班升班升班',attachments=qq)